package com.vue.api.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Page<T> implements Serializable{


	//-- 分页参数 --//
	protected int pageNo = 1; 
	protected int pageSize = -1; 
	

	//-- 返回结果 --//
	protected  List<?> result = new ArrayList<>();
	protected long totalCount = -1;

	protected int first; 
	protected int end;
	
	protected Object obj;
	
	public Page(int pageNo,int pageSize){
		this.pageNo=pageNo;
		this.pageSize=pageSize;
		this.first=(pageNo - 1) * pageSize;
		this.end = first + pageSize;
	}


	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	
	public long getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(long totalCount) {
		this.totalCount = totalCount;
	}

	public List<?> getResult() {
		return result;
	}

	public void setResult(List<?> result) {
		this.result = result;
	}


	public Object getObj() {
		return obj;
	}


	public void setObj(Object obj) {
		this.obj = obj;
	}


	public int getFirst() {
		return first;
	}

	public void setFirst(int first) {
		this.first = first;
	}

	public int getEnd() {
		return end;
	}


	public void setEnd(int end) {
		this.end = end;
	}
	
}